package Day017_缓冲流_转换流_序列化流_打印流.ZuoYe;

import java.io.BufferedOutputStream;
import java.io.FileOutputStream;

/**
 * @author zhangyan
 * @date 2020/5/9 19:16
 */
public class Test3 {
    public static void main(String[] args) throws Exception {

        //创建一个字节缓冲输出流对象
        BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream("Demo02\\aaa\\d.txt"));

        //创建字节数组
        String s = "i love java”";
        byte[] bytes = s.getBytes();

        //写入字节数组数据
        bos.write(bytes);

        //关流
        bos.close();
    }
}
